<style type="text/css">
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
</style>
<div class="fui-page  fui-page-current page-goods-list">
<div class="fui-content" style="top:0">
<div class="fui-header">
		<div class="fui-header-left" ng-click="access_json('select_area/')">
			<span ng-show="pagedata.pcd.district" style="font-size:0.65rem">{{pagedata.pcd.district}}</span>
			<span ng-show="!pagedata.pcd.district" style="font-size:0.65rem">{{pagedata.pcd.city || '广州市'}}</span>
			<i class="icon jinyunicon icon-moreunfold"></i>
		</div>
		<div class="title">
			<form method="post">
					<div class="searchbar searchbar-active" style="margin-left:3.2rem">
					<div class="search-input">
						<i class="icon jinyunicon icon-search" style="font-size: 1.0rem;"></i>
						<input type="search" id="search" placeholder="输入关键字..." value="">
					</div>
					</div>
			</form>
		</div>
		<div class="fui-header-right" data-nomenu="true">
			<a href="javascript:;"><i class="icon jinyunicon icon-saoyisao2" id="listblock" style="font-size: 1.0rem;"></i></a>
		</div>
</div>
<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.setting.hdps">
			
			<a href="{{item.url}}">
				<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.adv" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
</div>
<div class="fui-article-list template-2">
				<div class="fui-tab-scroll">
					<div class='xcontainer'>
						<span ng-repeat="item in pagedata.groups" ng-class="{'item':1,'active':pagedata.index==$index}"><a class="jylabel jylabel-f60-0" href="javascript:" ng-click="access_json('main','group_id='+$item.id)">{{item.title}}</a></span>
					</div>
				</div>
				<div class="fui-goods-group block" style="background: {background};">
					   <div id="listitem" ng-repeat="item in pagedata.list">
					   <a class="fui-goods-item" data-nocache="true" style="position: relative;" ng-show="item.ishome" >
						<div  class="image triangle" ng-click="access_json(item.url)" data-text='{{item.ishot}}' style="background-image: url({{tomedia(item.image)}});">
						 </div>
							 <div class="detail" >
									<div class="name" style="color: {titlecolor};">
											   {{item.title}}
									 </div>
							 </div>
						</a>
						</div>
				</div>
				<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div> 
				
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script type="text/javascript">
scope.pagedata.action = 'dish';
scope.loading = true;  //状态标记
//滚动加载
scope.scroll(function(){
	scope.loading = true;  //状态标记
	scope.$apply();
	setTimeout('getlist()',2000);
},false,'svposttext');
// 百度地图API功能
window.scope.location(function(res){
if(!scope.pagedata.pcd.city){
	scope.$apply(function(){
		scope.pagedata.pcd.province = res.addressComponents.province;
		scope.pagedata.pcd.city = res.addressComponents.city;
	});
}
	getlist(res.lat_lng);
});
getlist();
var page = 1;
function getlist(){
		var params = {
					'plugin':'jy_cms360',
					'action':'list',
					'op':'list',
					'data':{
						'page':page,
					},
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$("#listitem").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								window.scope.pagedata.list=data.list;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
		scope.post_json(params);
}
</script>
</script>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>
<div ng-include="sys_html('_footer')"></div>